import re

print('\u4e00')
print('\u9fa5')
s = '\u4e00'
print(s)

print(0x4e00)
print(0x9fa5)

list1 = [x for x in range(0x4e00,0x9fa5+1)]
# print(list1)
for i in list1:
    s = str(hex(i)).replace('0x','\\u')
    # print(type(s))
    print(s)
    # print(eval(s))


print(type('\u9fa5'))
# print('\u2036')

print(m1)  # <_sre.SRE_Match object; span=(0, 3), match='foo'>
print(type(m1))  # <class '_sre.SRE_Match'>
print(m1.group())  # 获取匹配 上的内容

m2 = re.match("foo", "test_foo")
print(m2)  # None,匹配失败

# 2.search(),搜索,字符串中任意位置匹配上都可以。
m3 = re.search("foo", "hellofoo_test")
print(m3)
print(m3.group())
